#include "bbase_macro.h"
#include <stdio.h>
#include <stdlib.h>

int error_handle( const char* psz_cond, const char* psz_file, int n_line, void* p_param );

int main( int argn, char** argv )
{
	bb_error_f( argn > 1, &error_handle, 0 );
	
	{
		char* p = NULL;
		bb_error( p = (char*)malloc( 10 ) );
		bb_free( p );
	}

	printf( "Everthing is ok\n" );

	bb_exit
	return 0;
}

int error_handle( const char* psz_cond, const char* psz_file, int n_line, void* p_param )
{
	printf( "%s\n%s\n%d\n", psz_cond, psz_file, n_line );

	bb_exit
	return 0;
}